import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';

export default async function a006(fd: IFeidaoAiBrowserComponent, e: Event) {
	// todo 全选框
	const d = e.currentTarget as HTMLInputElement;
	const a = d.getAttribute("checked");
	const s = fd.data.node.querySelectorAll<HTMLInputElement>('[type="checkbox"]');
	if (!a) {
		for (let i = 0; i < s.length; i++) {
			s[i].setAttribute("checked", "checked");
		}
	} else {
		for (let i = 0; i < s.length; i++) {
			s[i].removeAttribute("checked");
		}
	}
}
